package com.aco.party.web.validator.system;

import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

import com.aco.party.web.command.system.EditPermissionCommand;

public class EditPermissionValidator implements Validator{

	public boolean supports(Class<?> clazz) {
		return EditPermissionCommand.class.isAssignableFrom(clazz);
	}

	public void validate(Object target, Errors errors) {
		//EditPermissionCommand permissionCommand=(EditPermissionCommand)target;
		ValidationUtils.rejectIfEmptyOrWhitespace(errors, "realm", "realm.empty","realm 不能为空！");
	}

}
